version = "0.0.1-pre"
dependencies = [
"curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)",
- "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
- "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
- "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1)",
- "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)",
- "glob 0.0.1 (git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be)",
+ "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
+ "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
+ "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d)",
+ "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)",
+ "glob 0.0.1 (git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d)",
"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b8622d54587590f324b97cc98)",
"semver 0.1.0 (git+https://github.com/rust-lang/semver#c88a711f543c57368be347686a549aa4254ec48f)",
- "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23)",
- "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3)",
+ "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
]
[[package]]
dependencies = [
"curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)",
"link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
]
[[package]]
[[package]]
name = "docopt"
version = "0.6.3"
-source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736"
+source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02"
[[package]]
name = "docopt_macros"
version = "0.6.3"
-source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736"
+source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02"
dependencies = [
- "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
+ "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
]
[[package]]
[[package]]
name = "flate2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1"
+source = "git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d"
[[package]]
name = "git2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879"
+source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72"
dependencies = [
- "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
]
[[package]]
name = "glob"
version = "0.0.1"
-source = "git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be"
+source = "git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d"
[[package]]
name = "hamcrest"
[[package]]
name = "libgit2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879"
+source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72"
dependencies = [
"libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#6a5d3ad7b62db6ca0721c528402f4976a1876036)",
"link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)",
[[package]]
name = "tar"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23"
+source = "git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3"
[[package]]
name = "toml"
version = "0.1.0"
-source = "git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486"
+source = "git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f"
[[package]]
name = "url"
version = "0.1.0"
-source = "git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f"
+source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243"
dependencies = [
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)",
]
-use std::{fmt, os, result, mem};
+use std::{fmt, os, mem};
use std::io::fs::{PathExtensions, File};
use std::collections::HashMap;
use std::string;
toml::String(val) => Ok(String(val, path.clone())),
toml::Boolean(b) => Ok(Boolean(b, path.clone())),
toml::Array(val) => {
- Ok(List(try!(result::collect(val.move_iter().map(|toml| {
+ Ok(List(try!(val.into_iter().map(|toml| {
match toml {
toml::String(val) => Ok((val, path.clone())),
_ => Err(internal("")),
}
- })))))
+ }).collect::<Result<_, _>>())))
}
toml::Table(val) => {
- Ok(Table(try!(result::collect(val.move_iter().map(|(key, value)| {
+ Ok(Table(try!(val.into_iter().map(|(key, value)| {
let value = raw_try!(ConfigValue::from_toml(path, value));
Ok((key, value))
- })))))
+ }).collect::<Result<_, _>>())))
}
_ => return Err(internal(""))
}